﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmCompensacionVehiculoAsociar.aspx.cs" Inherits="Crosland.Automotriz.Web.Vehiculos.wFrmCompensacionVehiculoAsociar" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">

<script type="text/javascript">

    function ShowValidacion() {
        popupValidacion.Show();
    }

    function ShowValidacion2() {
        popupValidacion2.Show();
    }

    function ShowValidacion() {
        popupValidacion.Show();
    }

    function ShowExito() {
        popupExito.Show();
    }

    function ShowError() {
        popupError.Show();
    }

    function ShowpopupActualiza() {
        popupActualiza.Show();
    }

    function HidepopupActualiza() {
        popupActualiza.Hide();
    }

    function GetSelectedFieldValuesCallback(values) {

        var total = 0;

        for (var i = 0; i < values.length; i++) {
            total = parseFloat(total) + parseFloat(values[i]);
        }

        document.getElementById("lblTotal").innerHTML = numberWithCommas(total.toFixed(2));

    }

    function numberWithCommas(x) {
        var parts = x.toString().split(".");
        parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
        return parts.join(".");
    }

    function OnGetSelectedFieldValues(selectedValues) {

        var total = 0;

        for (var i = 0; i < selectedValues.length; i++) {

            var tipo = selectedValues[i][0].toString();

            if (tipo == "111" || tipo == "112" || tipo == "113" || tipo == "114") {
                total = total;
            }
            else {
                total = total + selectedValues[i][1];
            }

        }

        document.getElementById("lblTotal").innerHTML = numberWithCommas(total.toFixed(2));

    }


    


</script>

<%--</ContentTemplate>
</asp:UpdatePanel>--%>

     <div class="main-header" style="width:100%;">
                <div class="main-titulo">Asociar Facturas</div>
     </div>

     <div class="content-form">

         <table>
            <tr>
                <td>
                    <dx:ASPxButton ID="btnGuardar" runat="server" Text="Guardar" 
                        AutoPostBack="False" ClientInstanceName="btnGuardar" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                        Width="100px">
                        <ClientSideEvents Click="function(s, e) {
	popupGuardar.Show();
}" />
                        <Image Url="~/Images/save_16.gif">
                        </Image>
                    </dx:ASPxButton>
                </td>
                <td>
                    <dx:aspxbutton ID="btnSalir" runat="server" Text="Salir" AutoPostBack="False" 
                        ClientInstanceName="btnSalir" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                        Width="100px" onclick="btnSalir_Click">
                        <Image Url="~/Images/logout.png">
                        </Image>
                    </dx:aspxbutton>
                </td>
            </tr>
         </table>

         <div style="clear:both;height:15px"></div>

         <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" 
             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
             CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
             GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" 
             HeaderText="Datos del Deposito" 
             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
             <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" 
                 PaddingTop="10px" />
             <HeaderStyle>
             <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" 
                 PaddingTop="3px" />
             </HeaderStyle>
             <PanelCollection>
                 <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                    <table style="width: 516px">
                        <tr>
                            <td style="width: 54px; height: 17px;" class="formato-tabla-td">
                                <dx:ASPxLabel ID="AspxLabel1" runat="server" Text="Cliente:" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue">
                                </dx:ASPxLabel>
                            </td>
                            <td style="height: 17px; ">
                                <dx:ASPxLabel ID="lblCliente" runat="server" Text="" Width="369px" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Height="21px" Font-Bold="True">
                                    <Border BorderWidth="1px" />
                                </dx:ASPxLabel>
                            </td>
                            <td colspan="2">
                                <dx:ASPxLabel ID="lblIdCliente" runat="server" 
                                    ClientInstanceName="lblIdCliente" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Visible="False">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td class="formato-tabla-td" style="height: 10px;" colspan="6">
                            </td>
                        </tr>
                        <tr>
                            <td class="formato-tabla-td" style="width: 54px; height: 17px;">
                                Glosa:</td>
                            <td colspan="5" style="height: 17px; ">
                                <asp:UpdatePanel ID="upGLosa" runat="server">
                                <ContentTemplate>
                                    <dx:ASPxMemo ID="txtGlosa" runat="server" ClientInstanceName="txtGlosa" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" Height="40px" 
                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="390px">
                                    </dx:ASPxMemo>
                                </ContentTemplate>
                                </asp:UpdatePanel>
                                
                            </td>
                        </tr>
                        <tr>
                            <td class="formato-tabla-td" style="height: 7px;" colspan="6">
                                </td>
                        </tr>
                        </Table>

                        <table style="width: 683px">
                        <tr>
                            <td style="width: 244px" class="formato-tabla-td">
                                <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="Fecha Compensacion:" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue">
                                </dx:ASPxLabel>
                            </td>
                            <td style="width: 183px">
                                <strong>
                                <dx:ASPxLabel ID="lblFechaCompensacion" runat="server" Font-Bold="True" 
                                    style="color: #006600" Width="80px">
                                </dx:ASPxLabel>
                                </strong>
                            </td>
                            <td style="width: 311px; text-align: left;" class="boton-form">
                                Tipo de Operación:
                            </td>
                            <td style="width: 166px">
                                <dx:ASPxComboBox ID="cboTipoOperacion" runat="server" 
                                    ClientInstanceName="cboTipoOperacion" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Spacing="0" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    TextField="NOM_MONEDA" ValueField="ID_MONEDA" Width="100px">
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                            </td>
                            <td class="boton-form" style="text-align: left; width: 193px">
                                Tipo Cambio:</td>
                            <td class="boton-form" style="width: 84px">
                                <strong>
                                <dx:ASPxLabel ID="lblTipoCambio" runat="server" Font-Bold="True" 
                                    style="color: #FF0000">
                                </dx:ASPxLabel>
                                </strong>
                            </td>
                        </tr>
                    </table>
                    <div style="clear:both;height:10px"></div>

                     <dx:ASPxGridView ID="grdDepositos" runat="server" AutoGenerateColumns="False" 
                         CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                         CssPostfix="Office2010Blue" EnableCallBacks="False" 
                         KeyFieldName="ID" OnRowDeleting="grdDepositos_RowDeleting" 
                         OnParseValue="grdDepositos_ParseValue" 
                         OnRowValidating="grdDepositos_RowValidating" 
                         OnStartRowEditing="grdDepositos_StartRowEditing" style="margin-right: 0px" 
                         OnRowCommand="grdDepositos_RowCommand" 
                         OnPageIndexChanged="grdDepositos_PageIndexChanged">
                         <TotalSummary>
                             <dx:ASPxSummaryItem DisplayFormat="n2" FieldName="DebeSoles" 
                                 SummaryType="Sum" />
                             <dx:ASPxSummaryItem DisplayFormat="n2" FieldName="DebeDolar" 
                                 SummaryType="Sum" />
                             <dx:ASPxSummaryItem DisplayFormat="n2" FieldName="HaberSoles" 
                                 SummaryType="Sum" />
                             <dx:ASPxSummaryItem DisplayFormat="n2" FieldName="HaberDolar" 
                                 SummaryType="Sum" />
                         </TotalSummary>
                         <Columns>
                              <dx:GridViewCommandColumn ShowInCustomizationForm="True" VisibleIndex="0" 
                                 FixedStyle="Left" Width="80px" Caption="Acciones">
                                 <EditButton Text="Editar">
                                 </EditButton>
                                 <DeleteButton Text="Quitar" Visible="True">
                                 </DeleteButton>
                                  <HeaderStyle HorizontalAlign="Center" />
                              </dx:GridViewCommandColumn>

                               <dx:GridViewDataTextColumn Caption="Editar" VisibleIndex="1">
                                         <DataItemTemplate>
                                             <asp:ImageButton ID="btnEditar" runat="server" 
                                                 CommandArgument='<%# Bind("ID") %>' CommandName="Editar" 
                                                 ImageUrl="~/Images/edit2.gif" ImageAlign="Middle" />
                                         </DataItemTemplate>
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Center">
                                         </CellStyle>
                               </dx:GridViewDataTextColumn>

                             <dx:GridViewDataTextColumn Caption="Haber S/." ShowInCustomizationForm="True" 
                                 VisibleIndex="8" FieldName="HaberSoles" Width="80px">
                                 <PropertiesTextEdit Width="80px">
                                     <ReadOnlyStyle BackColor="#FFFFCC">
                                     </ReadOnlyStyle>
                                 </PropertiesTextEdit>
                                 <HeaderStyle HorizontalAlign="Center" />
                                 <CellStyle BackColor="#930049" ForeColor="White">
                                 </CellStyle>
                                 <FooterCellStyle Font-Bold="True" ForeColor="#930049">
                                 </FooterCellStyle>
                             </dx:GridViewDataTextColumn>
                             <dx:GridViewDataTextColumn Caption="Moneda" ShowInCustomizationForm="True" 
                                 VisibleIndex="4" FieldName="Moneda" ReadOnly="True" Width="50px">
                                 <PropertiesTextEdit DisplayFormatString="n2" Width="80px">
                                     <ReadOnlyStyle BackColor="#FFFFCC">
                                     </ReadOnlyStyle>
                                 </PropertiesTextEdit>
                                 <HeaderStyle HorizontalAlign="Center" />
                             </dx:GridViewDataTextColumn>
                             <dx:GridViewDataTextColumn Caption="Debe $" ShowInCustomizationForm="False" 
                                 VisibleIndex="9" FieldName="DebeDolar" Width="80px">
                                 <PropertiesTextEdit DisplayFormatString="n2" Width="80px">
                                     <ReadOnlyStyle BackColor="#FFFFCC">
                                     </ReadOnlyStyle>
                                 </PropertiesTextEdit>
                                 <HeaderStyle HorizontalAlign="Center" />
                                 <CellStyle BackColor="#007D5F" ForeColor="White">
                                 </CellStyle>
                                 <FooterCellStyle Font-Bold="True" ForeColor="#007D5F">
                                 </FooterCellStyle>
                             </dx:GridViewDataTextColumn>
                             <dx:GridViewDataTextColumn Caption="NroItem" FieldName="ID" 
                                 ShowInCustomizationForm="True" VisibleIndex="2" Width="50px" 
                                  ReadOnly="True" Name="ID">
                                 <PropertiesTextEdit DisplayFormatString="n2" Width="80px">
                                     <ReadOnlyStyle BackColor="#FFFFCC">
                                     </ReadOnlyStyle>
                                 </PropertiesTextEdit>
                                 <HeaderStyle HorizontalAlign="Center" />
                                 <CellStyle HorizontalAlign="Center">
                                 </CellStyle>
                                 <FooterCellStyle Font-Bold="True" ForeColor="#000099">
                                 </FooterCellStyle>
                             </dx:GridViewDataTextColumn>
                             <dx:GridViewDataTextColumn Caption="Cuenta" FieldName="IdCuenta" 
                                 ShowInCustomizationForm="True" VisibleIndex="5" Width="70px" 
                                  ReadOnly="True">
                                 <PropertiesTextEdit DisplayFormatString="n2" Width="80px">
                                     <ReadOnlyStyle BackColor="#FFFFCC">
                                     </ReadOnlyStyle>
                                 </PropertiesTextEdit>
                                 <HeaderStyle HorizontalAlign="Center" />
                             </dx:GridViewDataTextColumn>
                             <dx:GridViewDataTextColumn Caption="Debe S/." FieldName="DebeSoles" 
                                 ShowInCustomizationForm="True" VisibleIndex="7" Width="80px">
                                 <PropertiesTextEdit DisplayFormatString="n2" Width="80px">
                                     <ReadOnlyStyle BackColor="#FFFFCC">
                                     </ReadOnlyStyle>
                                 </PropertiesTextEdit>
                                 <HeaderStyle HorizontalAlign="Center" />
                                 <CellStyle BackColor="#930049" ForeColor="White">
                                 </CellStyle>
                                 <FooterCellStyle Font-Bold="True" ForeColor="#930049">
                                 </FooterCellStyle>
                             </dx:GridViewDataTextColumn>
                             <dx:GridViewDataTextColumn Caption="Haber $" ShowInCustomizationForm="False" 
                                  VisibleIndex="10" FieldName="HaberDolar" Width="80px">
                                 <PropertiesTextEdit DisplayFormatString="n2" Width="80px">
                                 </PropertiesTextEdit>
                                 <HeaderStyle HorizontalAlign="Center" />
                                 <CellStyle BackColor="#007D5F" ForeColor="White">
                                 </CellStyle>
                                 <FooterCellStyle Font-Bold="True" ForeColor="#007D5F">
                                 </FooterCellStyle>
                             </dx:GridViewDataTextColumn>
                             <dx:GridViewDataTextColumn Caption="T.Cambio" FieldName="TipoCambio" 
                                 ShowInCustomizationForm="True" VisibleIndex="11" Width="50px" 
                                  ReadOnly="True">
                                 <PropertiesTextEdit DisplayFormatString="n3" Width="80px">
                                 </PropertiesTextEdit>
                                 <HeaderStyle HorizontalAlign="Center" />
                                 <CellStyle Font-Bold="False" HorizontalAlign="Center">
                                 </CellStyle>
                                 <FooterCellStyle Font-Bold="True" ForeColor="#006600" HorizontalAlign="Center">
                                 </FooterCellStyle>
                             </dx:GridViewDataTextColumn>
                              <dx:GridViewDataTextColumn Caption="Nro. Documento" FieldName="NroDocumento" 
                                  ShowInCustomizationForm="True" VisibleIndex="6" ReadOnly="True" 
                                  Width="80px">
                                  <PropertiesTextEdit DisplayFormatString="n2" Width="50px">
                                      <ReadOnlyStyle BackColor="#FFFFCC">
                                      </ReadOnlyStyle>
                                  </PropertiesTextEdit>
                              </dx:GridViewDataTextColumn>
                              
                              <dx:GridViewDataTextColumn Caption="Ajustar" VisibleIndex="14">
                                         <DataItemTemplate>
                                             <asp:ImageButton ID="btnAjustar" runat="server" 
                                                 CommandArgument='<%# Bind("ID") %>' CommandName="Ajustar" 
                                                 ImageUrl="~/Images/calculator_add.png" ToolTip="Ajustar" ImageAlign="Middle" />
                                         </DataItemTemplate>
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Center">
                                         </CellStyle>
                               </dx:GridViewDataTextColumn>

                              <dx:GridViewDataTextColumn Caption="IdTipoDoc" FieldName="IdClaseFactura" 
                                  ShowInCustomizationForm="True" VisibleIndex="12" Visible="False">
                              </dx:GridViewDataTextColumn>
                              <dx:GridViewDataTextColumn Caption="Tipo Doc" FieldName="DesClaseFactura" 
                                  ShowInCustomizationForm="True" VisibleIndex="3" Width="150px">
                                  <PropertiesTextEdit Width="75px">
                                  </PropertiesTextEdit>
                                  <PropertiesTextEdit DisplayFormatString="n2">
                                  </PropertiesTextEdit>
                                  <HeaderStyle HorizontalAlign="Center" />
                              </dx:GridViewDataTextColumn>
                              <dx:GridViewDataTextColumn Caption="ImpAplicar" FieldName="ImpAplicar" 
                                  ShowInCustomizationForm="True" VisibleIndex="13" Visible="False">
                              </dx:GridViewDataTextColumn>
                              <dx:GridViewDataTextColumn Caption="NroOperacion" FieldName="NroOperacion" 
                                  ShowInCustomizationForm="True" Visible="False" VisibleIndex="17">
                              </dx:GridViewDataTextColumn>
                              <dx:GridViewDataTextColumn Caption="IdMoneda" FieldName="IdMoneda" 
                                  ShowInCustomizationForm="True" Visible="False" VisibleIndex="16">
                              </dx:GridViewDataTextColumn>
                         </Columns>
                         <SettingsBehavior AllowSort="False" AllowDragDrop="False" AllowGroup="False" />
                         <SettingsEditing 
                             PopupEditFormHorizontalAlign="NotSet" 
                             PopupEditFormVerticalAlign="NotSet" />
                         <Settings ShowFooter="True" />
                         <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                             <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                             </LoadingPanelOnStatusBar>
                             <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                             </LoadingPanel>
                         </Images>
                         <ImagesFilterControl>
                             <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                             </LoadingPanel>
                         </ImagesFilterControl>
                         <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                             CssPostfix="Office2010Blue">
                             <Header ImageSpacing="5px" SortingImageSpacing="5px">
                             </Header>
                             <LoadingPanel ImageSpacing="5px">
                             </LoadingPanel>
                         </Styles>
                         <StylesPager>
                             <PageNumber ForeColor="#3E4846">
                             </PageNumber>
                             <Summary ForeColor="#1E395B">
                             </Summary>
                         </StylesPager>
                         <StylesEditors ButtonEditCellSpacing="0">
                             <ProgressBar Height="21px">
                             </ProgressBar>
                         </StylesEditors>
                     </dx:ASPxGridView>
                     <br />
                     <dx:ASPxButton ID="btnBuscarFacturas" runat="server" AutoPostBack="False" 
                         ClientInstanceName="btnBuscarFacturas" 
                         CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                         CssPostfix="Office2010Blue" HorizontalAlign="Left" ImageSpacing="2px" 
                         OnClick="btnBuscarFacturas_Click" 
                         SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                         Text="Buscar Facturas" Width="148px">
                         <ClientSideEvents Click="function(s, e) {
    grdFacturas.UnselectAllRowsOnPage();
	pcFacturas.Show();
	}" />
                         <Image Url="~/Images/search.png">
                         </Image>
                     </dx:ASPxButton>
                     <table>
                         <tr>
                             <td colspan="2">
                                 <dx:ASPxButton ID="btnAjuste" runat="server" ClientInstanceName="btnAjuste" 
                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                     CssPostfix="Office2010Blue" HorizontalAlign="Left" OnClick="btnAjuste_Click" 
                                     SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Ajuste" 
                                     Visible="False" Width="50px">
                                     <Image Url="~/Images/calculator_add.png">
                                     </Image>
                                 </dx:ASPxButton>
                             </td>
                         </tr>
                         <tr>
                             <td>
                                 <strong>
                                 <dx:ASPxLabel ID="ASPxLabel3" runat="server" 
                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                     CssPostfix="Office2010Blue" Font-Bold="True" Text="TotalDebeSoles:" 
                                     Visible="False">
                                 </dx:ASPxLabel>
                                 </strong>
                             </td>
                             <td>
                                 <strong>
                                 <asp:Label ID="lblTotDebeSoles" runat="server" ForeColor="#660033" 
                                     style="color: #993366" Visible="False"></asp:Label>
                                 </strong>
                             </td>
                         </tr>
                         <tr>
                             <td>
                                 <strong>
                                 <dx:ASPxLabel ID="ASPxLabel8" runat="server" 
                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                     CssPostfix="Office2010Blue" Font-Bold="True" Text="TotalDebeDolar:" 
                                     Visible="False">
                                 </dx:ASPxLabel>
                                 </strong>
                             </td>
                             <td>
                                 <strong>
                                 <asp:Label ID="lblTotDebeDolar" runat="server" ForeColor="#660033" 
                                     style="color: #993366" Visible="False"></asp:Label>
                                 </strong>
                             </td>
                         </tr>
                         <tr>
                             <td>
                                 <strong>
                                 <dx:ASPxLabel ID="ASPxLabel4" runat="server" 
                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                     CssPostfix="Office2010Blue" Font-Bold="True" Text="TotalHaberSoles:" 
                                     Visible="False">
                                 </dx:ASPxLabel>
                                 </strong>
                             </td>
                             <td>
                                 <strong>
                                 <asp:Label ID="lblTotHaberSoles" runat="server" style="color: #3333CC" 
                                     Visible="False"></asp:Label>
                                 </strong>
                             </td>
                         </tr>
                         <tr>
                             <td>
                                 <strong>
                                 <dx:ASPxLabel ID="ASPxLabel5" runat="server" 
                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                     CssPostfix="Office2010Blue" Font-Bold="True" Text="TotalHaberDolar:" 
                                     Visible="False">
                                 </dx:ASPxLabel>
                                 </strong>
                             </td>
                             <td>
                                 <strong>
                                 <asp:Label ID="lblTotHaberDolar" runat="server" style="color: #3333CC" 
                                     Visible="False"></asp:Label>
                                 </strong>
                             </td>
                         </tr>
                     </table>
                     <br />
                 </dx:PanelContent>
             </PanelCollection>
         </dx:ASPxRoundPanel>

         <br />
         <dx:ASPxRoundPanel ID="ASPxRoundPanel2" runat="server" 
             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
             CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
             GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" 
             HeaderText="Usuarios a notificar" 
             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="200px">
             <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" 
                 PaddingTop="10px" />
             <HeaderStyle>
             <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" 
                 PaddingTop="3px" />
             </HeaderStyle>
             <PanelCollection>
<dx:PanelContent ID="PanelContent2" runat="server" SupportsDisabledAttribute="True">
    <dx:ASPxGridView ID="grdUsuariosNotificar" runat="server" 
        AutoGenerateColumns="False" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" Width="420px">
        <Columns>
            <dx:GridViewDataTextColumn Caption="Id" ShowInCustomizationForm="True" 
                VisibleIndex="0" Width="75px" FieldName="ID_USUARIO">
                <HeaderStyle HorizontalAlign="Center" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Nombre y Apellidos" ShowInCustomizationForm="True" 
                VisibleIndex="1" FieldName="NOMBRE_APELLIDO" Width="120px">
                <HeaderStyle HorizontalAlign="Center" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Correo" FieldName="CORREO" 
                ShowInCustomizationForm="True" VisibleIndex="2">
                <HeaderStyle HorizontalAlign="Center" />
            </dx:GridViewDataTextColumn>
        </Columns>
        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="5px">
            </LoadingPanel>
        </Styles>
        <StylesPager>
            <PageNumber ForeColor="#3E4846">
            </PageNumber>
            <Summary ForeColor="#1E395B">
            </Summary>
        </StylesPager>
        <StylesEditors ButtonEditCellSpacing="0">
            <ProgressBar Height="21px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
                 </dx:PanelContent>
</PanelCollection>
         </dx:ASPxRoundPanel>
         <br />

         <div style="clear:both;height:15px"></div>

        

         <dx:ASPxPopupControl ID="pcFacturas" runat="server" AllowDragging="True" 
             ClientInstanceName="pcFacturas" CloseAction="CloseButton" 
             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
             CssPostfix="Office2010Blue" EnableHotTrack="False" EnableViewState="False" 
             HeaderText="Comprobantes" Modal="True" PopupHorizontalAlign="WindowCenter" 
             PopupVerticalAlign="WindowCenter" 
             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
             Width="1200px" ViewStateMode="Enabled">
             <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
             </LoadingPanelImage>
             <HeaderStyle>
             <Paddings PaddingLeft="7px" />
             </HeaderStyle>
             <LoadingPanelStyle ImageSpacing="5px">
             </LoadingPanelStyle>
             <ContentCollection>
                 <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True">
                     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                     <ContentTemplate>
                     
                     

                    <table>
                        <tr>
                            <td>
                                <dx:ASPxLabel ID="ASPxLabel6" runat="server" Text="Año:">
                                </dx:ASPxLabel>
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="ddlAnio" runat="server" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Spacing="0" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    Width="70px" SelectedIndex="0" Height="30px">
                                    <Items>
                                        <dx:ListEditItem Selected="True" Text="2013" Value="2013" />
                                        <dx:ListEditItem Text="2014" Value="2014" />
                                        <dx:ListEditItem Text="2015" Value="2015" />
                                    </Items>
                                    <ItemStyle Height="30px" />
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <DropDownButton Width="20px">
                                    </DropDownButton>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                    <Paddings PaddingLeft="5px" />
                                </dx:ASPxComboBox>
                            </td>
                            <td>
                            </td>
                            <td>
                                <dx:ASPxLabel ID="ASPxLabel7" runat="server" Text="Mes:">
                                </dx:ASPxLabel>
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="ddlMes" runat="server" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Spacing="0" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    Width="100px" Height="30px">
                                    <Items>
                                        <dx:ListEditItem Text="Enero" Value="1" />
                                        <dx:ListEditItem Text="Febrero" Value="2" />
                                        <dx:ListEditItem Text="Marzo" Value="3" />
                                        <dx:ListEditItem Text="Abril" Value="4" />
                                        <dx:ListEditItem Text="Mayo" Value="5" />
                                        <dx:ListEditItem Text="Junio" Value="6" />
                                        <dx:ListEditItem Text="Julio" Value="7" />
                                        <dx:ListEditItem Text="Agosto" Value="8" />
                                        <dx:ListEditItem Text="Setiembre" Value="9" />
                                        <dx:ListEditItem Text="Octubre" Value="10" />
                                        <dx:ListEditItem Text="Noviembre" Value="11" />
                                        <dx:ListEditItem Text="Diciembre" Value="12" />
                                    </Items>
                                    <ItemStyle Height="30px" />
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <DropDownButton Width="20px">
                                    </DropDownButton>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                    <Paddings PaddingLeft="5px" />
                                </dx:ASPxComboBox>
                            </td>
                            <td>
                            </td>
                            <td>
                            
                                <dx:ASPxLabel ID="ASPxLabel9" runat="server" Text="Oficina:">
                                </dx:ASPxLabel>
                            
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="ddlOficina" runat="server" ValueField="ID_OFI_VTA" TextField="DES_OFI_VTA"
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Spacing="0" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    Width="150px" Height="30px">
                                    <ItemStyle Height="30px" />
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <DropDownButton Width="20px">
                                    </DropDownButton>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                    <Paddings PaddingLeft="5px" />
                                </dx:ASPxComboBox>
                            </td>
                            <td>
                            </td>
                            <td>
                                Estado:</td>
                            <td>
                                <dx:ASPxComboBox ID="ddlestado" runat="server" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" SelectedIndex="0" Spacing="0" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    Width="100px" Height="30px">
                                    <Items>
                                        <dx:ListEditItem Selected="True" Text="Con Saldo" Value="1" />
                                        <dx:ListEditItem Text="Sin Saldo" Value="0" />
                                    </Items>
                                    <ItemStyle Height="30px" />
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <DropDownButton Width="20px">
                                    </DropDownButton>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                    <Paddings PaddingLeft="5px" />
                                </dx:ASPxComboBox>
                            </td>
                            <td>
                            </td>
                            <td>
                                <dx:ASPxButton ID="btnBuscar" runat="server" Text="Buscar" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" OnClick="btnBuscar_Click" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    HorizontalAlign="Left" ImageSpacing="2px" Width="50px">
                                    <Image Url="~/Images/search.png">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                        </tr>
                     </table>

                     <div style="clear:both;height:15px"></div>

                             <dx:ASPxGridView ID="grdFacturas" runat="server" AutoGenerateColumns="False" 
                                 ClientInstanceName="grdFacturas" 
                                 CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                 CssPostfix="Office2010Blue" 
                             KeyFieldName="NRO_FACTURA" Width="100%">
                                 <ClientSideEvents SelectionChanged="function(s, e) {
	s.GetSelectedFieldValues('ID_CLASE_FACTURA;SaldoFacturaSoles',OnGetSelectedFieldValues);	
}" />
                                 <Columns>
                                     <dx:GridViewCommandColumn Name="command" ShowSelectCheckbox="True" 
                                         VisibleIndex="0" Width="25px">
                                     </dx:GridViewCommandColumn>
                                     <dx:GridViewDataTextColumn Caption="Nro. Comprobante &lt;br /&gt;SAP" 
                                         FieldName="NRO_FACTURA" VisibleIndex="1" 
                                         Width="70px">
                                         <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Folio" FieldName="NRO_FOLIO" 
                                         VisibleIndex="2" Width="80px">
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Right">
                                         </CellStyle>
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Fecha Comprobante" FieldName="FEC_FACTURA" 
                                         VisibleIndex="3" Width="75px">
                                         <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy">
                                         </PropertiesTextEdit>
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Right">
                                         </CellStyle>
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Importe $/.&lt;br /&gt;Comprobante" 
                                         FieldName="IMP_VENTA_DOLAR" VisibleIndex="5" Visible="False">
                                         <PropertiesTextEdit DisplayFormatString="n2">
                                         </PropertiesTextEdit>
                                         <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                         <CellStyle HorizontalAlign="Right">
                                         </CellStyle>
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Importe S/.&lt;br /&gt;Comprobante" 
                                         FieldName="IMP_VENTA_SOLES" VisibleIndex="6" 
                                         Width="60px" Visible="False">
                                         <PropertiesTextEdit DisplayFormatString="n2">
                                         </PropertiesTextEdit>
                                         <HeaderStyle HorizontalAlign="Center" />
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Saldo S/.&lt;br /&gt;Comprobante" 
                                         FieldName="SaldoFacturaSoles" Visible="False" 
                                         VisibleIndex="7" Width="75px">
                                         <PropertiesTextEdit DisplayFormatString="n2">
                                         </PropertiesTextEdit>
                                         <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                         <CellStyle HorizontalAlign="Right">
                                         </CellStyle>
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Moneda" FieldName="Moneda" VisibleIndex="4" 
                                         Width="35px">
                                         <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                         <CellStyle HorizontalAlign="Right">
                                         </CellStyle>
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="IdMoneda" FieldName="ID_MONEDA" 
                                         Visible="False" VisibleIndex="13">
                                         <HeaderStyle HorizontalAlign="Center" />
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="IdClaseFactura" 
                                         FieldName="ID_CLASE_FACTURA" Visible="False" 
                                         VisibleIndex="14">
                                         <HeaderStyle HorizontalAlign="Center" />
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Importe S/.&lt;br /&gt;Comprobante" 
                                         FieldName="IMP_VENTA_SOLES_POS" VisibleIndex="9" Width="60px">
                                         <PropertiesTextEdit DisplayFormatString="n2">
                                         </PropertiesTextEdit>
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Right">
                                         </CellStyle>
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Saldo S/.&lt;br /&gt;Comprobante" 
                                         FieldName="SaldoFacturaSoles_POS" VisibleIndex="11" Width="75px">
                                         <PropertiesTextEdit DisplayFormatString="n2">
                                         </PropertiesTextEdit>
                                         <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                         <CellStyle HorizontalAlign="Right">
                                         </CellStyle>
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Tipo de Documento" 
                                         FieldName="DES_CLASE_FACTURA" VisibleIndex="15" Width="80px">
                                         <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                         <CellStyle HorizontalAlign="Right">
                                         </CellStyle>
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Importe $&lt;br /&gt;Comprobante" 
                                         FieldName="IMP_VENTA_DOLAR_POS" VisibleIndex="10" Width="60px">
                                         <PropertiesTextEdit DisplayFormatString="n2">
                                         </PropertiesTextEdit>
                                         <HeaderStyle HorizontalAlign="Center" />
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Saldo $&lt;br /&gt;Comprobante" 
                                         FieldName="SaldoFacturaDolar_POS" VisibleIndex="12" Width="75px">
                                         <PropertiesTextEdit DisplayFormatString="n2">
                                         </PropertiesTextEdit>
                                         <HeaderStyle HorizontalAlign="Center" />
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="Saldo $&lt;br /&gt;Comprobante" 
                                         FieldName="SaldoFacturaDolar" Visible="False" VisibleIndex="8" Width="75px">
                                         <HeaderStyle HorizontalAlign="Center" />
                                     </dx:GridViewDataTextColumn>
                                     <dx:GridViewDataTextColumn Caption="TC" FieldName="IMP_TIPO_CAMBIO" 
                                         Visible="False" VisibleIndex="16" Width="50px">
                                     </dx:GridViewDataTextColumn>
                                 </Columns>
                                 <SettingsBehavior AllowDragDrop="False" AllowFocusedRow="True" 
                                     AllowGroup="False" ProcessSelectionChangedOnServer="False" />
                                 <SettingsPager Mode="ShowAllRecords">
                                 </SettingsPager>
                                 <Settings ShowFooter="True" ShowGroupFooter="VisibleAlways" 
                                     ShowVerticalScrollBar="True" />
                                 <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                     <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                     </LoadingPanelOnStatusBar>
                                     <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                     </LoadingPanel>
                                 </Images>
                                 <ImagesFilterControl>
                                     <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                     </LoadingPanel>
                                 </ImagesFilterControl>
                                 <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                     CssPostfix="Office2010Blue">
                                     <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                     </Header>
                                     <Footer Font-Bold="True">
                                     </Footer>
                                     <LoadingPanel ImageSpacing="5px">
                                     </LoadingPanel>
                                 </Styles>
                                 <StylesPager>
                                     <PageNumber ForeColor="#3E4846">
                                     </PageNumber>
                                     <Summary ForeColor="#1E395B">
                                     </Summary>
                                 </StylesPager>
                                 <StylesEditors ButtonEditCellSpacing="0">
                                     <ProgressBar Height="21px">
                                     </ProgressBar>
                                 </StylesEditors>
                             </dx:ASPxGridView>
                     
                     <div style="padding: 5px; clear:both; height:15px" align="right">
                         <asp:Label ID="Label1" runat="server" Font-Bold="True" 
                             Text="Total seleccionado: "></asp:Label>
                         <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ClientIDMode="Static">0.00</asp:Label>
                         </div>
                     <center>
                     <table>
                         <tr>
                             <td>
                                 <dx:ASPxButton ID="btnAceptarA" runat="server" Text="Aceptar" 
                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                     CssPostfix="Office2010Blue" 
                                     SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                     ClientInstanceName="btnAceptarA" 
                                     OnClick="btnAceptarA_Click" HorizontalAlign="Left" ImageSpacing="2px" 
                                     Width="50px" AutoPostBack="False">
                                     <ClientSideEvents Click="function(s, e) {
	pcFacturas.Hide();
    e.processOnServer = true;
}" />
                                     <Image Url="~/Images/ok.png">
                                     </Image>
                                 </dx:ASPxButton>
                             </td>
                             <td>
                                 <dx:ASPxButton ID="btnCancelar" runat="server" Text="Cancelar" 
                                     ClientInstanceName="btnCancelar" 
                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                     CssPostfix="Office2010Blue" 
                                     SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                     AutoPostBack="False" HorizontalAlign="Left">
                                     <ClientSideEvents Click="function(s, e) {
	pcFacturas.Hide();
}" />
                                     <Image Url="~/Images/cancel.png">
                                     </Image>
                                 </dx:ASPxButton>
                             </td>
                         </tr>
                     </table>
                     </center>

                     </ContentTemplate>
                     </asp:UpdatePanel>

                 </dx:PopupControlContentControl>
             </ContentCollection>
         </dx:ASPxPopupControl>

         <br />
         <dx:ASPxPopupControl ID="popupActualiza" runat="server" 
             ClientInstanceName="popupActualiza" CloseAction="CloseButton" 
             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
             CssPostfix="Office2010Blue" EnableHotTrack="False" HeaderText="Actualizar Datos" 
             Modal="True" PopupHorizontalAlign="WindowCenter" 
             PopupVerticalAlign="WindowCenter" 
             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
             Width="430px">
             <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
             </LoadingPanelImage>
             <HeaderStyle>
             <Paddings PaddingLeft="7px" />
             </HeaderStyle>
             <LoadingPanelStyle ImageSpacing="5px">
             </LoadingPanelStyle>
             <ContentCollection>
                 <dx:PopupControlContentControl ID="PopupControlContentControl2" runat="server" SupportsDisabledAttribute="True">

                 <table style="width: 384px">
                    <tr>
                        <td style="width: 107px">
                            <asp:Label ID="lblCuentaSoles" runat="server"></asp:Label>
                        </td>
                        <td style="width: 100px">
                            <asp:TextBox ID="txtSoles" runat="server" Width="80px"></asp:TextBox>
                        </td>
                        <td style="width: 14px"></td>
                        <td style="width: 52px">
                            <asp:Label ID="lblCuentaDolar" runat="server"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtDolar" runat="server" Width="80px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                     <tr>
                         <td style="width: 107px; height: 10px;">
                         </td>
                         <td style="width: 100px; height: 10px;">
                         </td>
                         <td style="width: 14px; height: 10px;">
                         </td>
                         <td style="width: 52px; height: 10px;">
                         </td>
                         <td style="height: 10px">
                         </td>
                         <td style="height: 10px">
                         </td>
                     </tr>
                     <tr>
                         <td style="width: 107px">
                             Tipo de Cambio:</td>
                         <td style="width: 100px">
                             <asp:Label ID="lblTCActualizar" runat="server"></asp:Label>
                         </td>
                         <td style="width: 14px">
                             &nbsp;</td>
                         <td style="width: 52px">
                             &nbsp;</td>
                         <td>
                             <asp:Label ID="lblSaldoOriginal" runat="server" Visible="False"></asp:Label>
                         </td>
                         <td>
                             &nbsp;</td>
                     </tr>
                     <tr>
                         <td style="width: 107px; height: 8px;">
                             </td>
                         <td style="width: 100px; height: 8px;">
                             </td>
                         <td style="width: 14px; height: 8px;">
                             </td>
                         <td style="width: 52px; height: 8px;">
                             </td>
                         <td style="height: 8px">
                             </td>
                         <td style="height: 8px">
                             </td>
                     </tr>
                 </table>
                 <center>
                     <table>
                        <tr>

                            <td>
                                <dx:ASPxButton ID="btnAgregar" runat="server" Text="Guardar" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    ImageSpacing="0px" Width="50px" HorizontalAlign="Left" 
                                    OnClick="btnAgregar_Click" VerticalAlign="Middle" AutoPostBack="False">
                                    <ClientSideEvents Click="function(s, e) {
	popupActualiza.Hide();
	e.processOnServer = true;
}" />
                                    <Image Url="~/Images/save_16.gif">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                            <td>
                                <dx:ASPxButton ID="ASPxButton2" runat="server" Text="Cancelar" 
                                    AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    HorizontalAlign="Left" ImageSpacing="0px" Width="50px">
                                    <ClientSideEvents Click="function(s, e) {
	popupActualiza.Hide();
}" />
                                    <Image Url="~/Images/cancel.png">
                                    </Image>
                                </dx:ASPxButton>
                            </td>

                        </tr>
                     </table>
                 </center>
                 </dx:PopupControlContentControl>
             </ContentCollection>
         </dx:ASPxPopupControl>

         <br />
         <dx:ASPxPopupControl ID="popupValidacion" runat="server" AllowDragging="True" 
             ClientInstanceName="popupValidacion" CloseAction="CloseButton" 
             CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
             EnableViewState="False" HeaderText="Mensaje" Height="38px" Modal="True" 
             PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
             SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="202px">
             <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
             </LoadingPanelImage>
             <CloseButtonStyle>
                 <Paddings Padding="0px" />
             </CloseButtonStyle>
             <ContentStyle>
                 <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
             </ContentStyle>
             <HeaderStyle>
             <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                 PaddingTop="4px" />
             </HeaderStyle>
             <ContentCollection>
                 <dx:PopupControlContentControl ID="PopupControlContentControl3" runat="server" SupportsDisabledAttribute="True">
                     <dx:ASPxPanel ID="ASPxPanel4" runat="server" Width="200px">
                         <PanelCollection>
                             <dx:PanelContent ID="PanelContent3" runat="server" SupportsDisabledAttribute="True">

                             <table style="width: 197px">
                    <tr>
                        <td style="width: 180px">
                            <center style="width: 193px">
                                <strong>
                                <asp:Label ID="lblValidacionA" runat="server" style="color: #FF0000">La factura seleccionada ya se agregó.</asp:Label>
                                </strong>
                            </center>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 180px; height: 18px; text-align: center;">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="width: 180px">
                            <center>
                                <dx:ASPxButton ID="btnOKV" runat="server" AutoPostBack="False" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="OK" 
                                    Width="50px">
                                    <ClientSideEvents Click="function(s, e) {
	popupValidacion.Hide();
    
}" />
                                </dx:ASPxButton>
                            </center>
                        </td>
                    </tr>
                </table>


                             </dx:PanelContent>
                         </PanelCollection>
                     </dx:ASPxPanel>
                 </dx:PopupControlContentControl>
             </ContentCollection>
         </dx:ASPxPopupControl>

         <br />
         <dx:ASPxPopupControl ID="popupGuardar" runat="server" CloseAction="CloseButton" 
             CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
             HeaderText="Mensaje" Modal="True" PopupHorizontalAlign="WindowCenter" 
             PopupVerticalAlign="WindowCenter" 
             SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" 
             ClientInstanceName="popupGuardar">
             <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
             </LoadingPanelImage>
             <CloseButtonStyle>
                 <Paddings Padding="0px" />
             </CloseButtonStyle>
             <ContentStyle>
                 <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
             </ContentStyle>
             <HeaderStyle>
             <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                 PaddingTop="4px" />
             </HeaderStyle>
             <ContentCollection>
                 <dx:PopupControlContentControl ID="PopupControlContentControl4" runat="server" SupportsDisabledAttribute="True">
                     <dx:ASPxPanel ID="ASPxPanel5" runat="server" Width="200px">
                         <PanelCollection>
                             <dx:PanelContent ID="PanelContent4" runat="server" SupportsDisabledAttribute="True">

                             <table>
                                     <tr>
                                         <td colspan="2">
                                             <center>
                                                 Esta seguro de guardar la compensación?.
                                             </center>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td colspan="2" style="height: 18px">
                                         </td>
                                     </tr>

                                     <tr>
                                         <td style="height: 27px">
                                             <center>
                                                 <dx:ASPxButton ID="btnConfirmar" runat="server" AutoPostBack="False" 
                                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                     CssPostfix="Office2010Blue" 
                                                     SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Si" 
                                                     Width="50px" OnClick="btnConfirmar_Click">
                                                     <ClientSideEvents Click="function(s, e) {
	popupGuardar.Hide();
	e.processOnServer = true;
}" />
                                                 </dx:ASPxButton>
                                             </center>
                                         </td>
                                         <td style="height: 27px">
                                             <center>
                                                 <dx:ASPxButton ID="btnNo" runat="server" AutoPostBack="False" 
                                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                     CssPostfix="Office2010Blue" 
                                                     SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="No" 
                                                     Width="50px">
                                                     <ClientSideEvents Click="function(s, e) {
	popupGuardar.Hide();
}" />
                                                 </dx:ASPxButton>
                                             </center>
                                         </td>
                                     </tr>

                             </table>

                             </dx:PanelContent>
                         </PanelCollection>
                     </dx:ASPxPanel>
                 </dx:PopupControlContentControl>
             </ContentCollection>
         </dx:ASPxPopupControl>

         <br />

         <dx:ASPxPopupControl ID="popupExito" runat="server" AllowDragging="True" 
             ClientInstanceName="popupExito" 
             CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
             EnableViewState="False" HeaderText="Mensaje" Height="22px" Modal="True" 
             PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
             SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="200px">
             <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
             </LoadingPanelImage>
             <CloseButtonStyle>
                 <Paddings Padding="0px" />
             </CloseButtonStyle>
             <ContentStyle>
                 <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
             </ContentStyle>
             <HeaderStyle>
             <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                 PaddingTop="4px" />
             </HeaderStyle>
             <ContentCollection>
                 <dx:PopupControlContentControl ID="PopupControlContentControl5" runat="server" SupportsDisabledAttribute="True">
                     <dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="200px">
                         <PanelCollection>
                             <dx:PanelContent ID="PanelContent5" runat="server" SupportsDisabledAttribute="True">
                             <div style="clear:both;height:15px"></div>
                                 
                                 <table>
                                     <tr>
                                         <td>
                                             <center>
                                                 Compensación Guardada Satisfactoriamente!!!!</center>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td>
                                             <center>
                                                 <dx:ASPxButton ID="btnOK" runat="server" AutoPostBack="False" 
                                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                     CssPostfix="Office2010Blue" 
                                                     SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="OK" 
                                                     Width="50px">
                                                     <ClientSideEvents Click="function(s, e) {
	popupExito.Hide();
	
}" />
                                                 </dx:ASPxButton>
                                             </center>
                                         </td>
                                     </tr>
                                 </table>
                             </dx:PanelContent>
                         </PanelCollection>
                     </dx:ASPxPanel>
                 </dx:PopupControlContentControl>
             </ContentCollection>
         </dx:ASPxPopupControl>
         
         <br />

         <dx:ASPxPopupControl ID="popupError" runat="server" AllowDragging="True" 
             ClientInstanceName="popupError" 
             CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
             EnableViewState="False" HeaderText="Mensaje" Height="22px" Modal="True" 
             PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
             SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="200px">
             <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
             </LoadingPanelImage>
             <CloseButtonStyle>
                 <Paddings Padding="0px" />
             </CloseButtonStyle>
             <ContentStyle>
                 <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
             </ContentStyle>
             <HeaderStyle>
             <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                 PaddingTop="4px" />
             </HeaderStyle>
             <ContentCollection>
                 <dx:PopupControlContentControl ID="PopupControlContentControl6" runat="server" SupportsDisabledAttribute="True">
                     <dx:ASPxPanel ID="ASPxPanel7" runat="server" Width="200px">
                         <PanelCollection>
                             <dx:PanelContent ID="PanelContent6" runat="server" SupportsDisabledAttribute="True">
                                 <div style="clear:both;height:15px">
                                 </div>
                                 <center>
                                 <table>
                                     <tr>
                                         <td>
                                             <center style="color: #FF0000">
                                                 <strong>Error al guardar la compensación!!!</strong></center>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td>
                                             <center>
                                                 <dx:ASPxButton ID="btnError" runat="server" AutoPostBack="False" 
                                                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                     CssPostfix="Office2010Blue" 
                                                     SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="OK" 
                                                     Width="50px">
                                                     <ClientSideEvents Click="function(s, e) {
	popupError.Hide();
}" />
                                                 </dx:ASPxButton>
                                             </center>
                                         </td>
                                     </tr>
                                 </table>
                                 </center>
                             </dx:PanelContent>
                         </PanelCollection>
                     </dx:ASPxPanel>
                 </dx:PopupControlContentControl>
             </ContentCollection>
         </dx:ASPxPopupControl>

         <br />
         <dx:ASPxPopupControl ID="popupValidacion2" runat="server" AllowDragging="True" 
             ClientInstanceName="popupValidacion2" CloseAction="CloseButton" 
             CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
             EnableViewState="False" HeaderText="Mensaje" Height="38px" Modal="True" 
             PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
             SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="202px">
             <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
             </LoadingPanelImage>
             <CloseButtonStyle>
                 <Paddings Padding="0px" />
             </CloseButtonStyle>
             <ContentStyle>
                 <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
             </ContentStyle>
             <HeaderStyle>
             <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                 PaddingTop="4px" />
             </HeaderStyle>
             <ContentCollection>
                 <dx:PopupControlContentControl ID="PopupControlContentControl7" runat="server" SupportsDisabledAttribute="True">
                     <dx:ASPxPanel ID="ASPxPanel8" runat="server" Width="200px">
                         <PanelCollection>
                             <dx:PanelContent ID="PanelContent7" runat="server" SupportsDisabledAttribute="True">

                             <table style="width: 197px">
                    <tr>
                        <td style="width: 180px">
                            <center style="width: 193px">
                                <strong>
                                <asp:Label ID="lblValidacionB" runat="server" style="color: #FF0000">Seleccione una factura con saldo mayor a 0.</asp:Label>
                                </strong>
                            </center>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 180px; height: 18px; text-align: center;">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="width: 180px">
                            <center>
                                <dx:ASPxButton ID="btnOKV0" runat="server" AutoPostBack="False" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="OK" 
                                    Width="50px">
                                    <ClientSideEvents Click="function(s, e) {
	popupValidacion2.Hide();
    
}" />
                                </dx:ASPxButton>
                            </center>
                        </td>
                    </tr>
                </table>


                             </dx:PanelContent>
                         </PanelCollection>
                     </dx:ASPxPanel>
                 </dx:PopupControlContentControl>
             </ContentCollection>
         </dx:ASPxPopupControl>

     </div>



<%--</ContentTemplate>
</asp:UpdatePanel>--%>

</asp:Content>
